<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>分页</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            list-style: none;
            text-decoration: none;
        }

        .pagination_pager {
            position: relative;
            float: left;
            padding: 6px 12px;
            margin-left: -1px;
            line-height: 22px;
            color: #337ab7;
            text-decoration: none;
            background-color: #fff;
            border: 1px solid #ddd;
            cursor: pointer;
        }

        #page-wrapper .pagination_pager:last-child {
            border-radius: 0 5px 5px 0;
        }

        #page-wrapper .pagination_pager:first-child {
            border-radius: 5px 0 0 5px;
        }

        .pagination_active {
            color: #fff;
            background-color: #337ab7;
        }
        /* css可以更改样式 */
    </style>
</head>

<body>
    <div id="pagination" style="padding: 100px;"></div>
    <script src="./pagination.js"></script>
    <script>
        // allPage 参数为 一共有多少页 currentPage 当前页数
        pagination({
            id: 'pagination',
            currentPage: 1,
            pageSize: 10,
            total: 200,
            hidePage: true,
            callback: function (e) {
                console.log(e)
            }
        });
    </script>
</body>

</html>